import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/pages/login'
import projectList from '../components/pages/projectList'
import projectAdd from '../components/pages/projectAdd'
import moduleList from '../components/pages/moduleList'
import moduleAdd from '../components/pages/moduleAdd'
import caseList from '../components/pages/caseList'
import caseSingleAdd from '../components/pages/caseSingleAdd'
import caseProcessAdd from '../components/pages/caseProcessAdd'
import testSuite from '../components/pages/testSuite'
import periodicTask from '../components/pages/periodicTask'
import reportList from '../components/pages/reportList'
import base from '../components/common/base'
import test from '../components/pages/test'
import report from '../components/pages/report'

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/base',
      name: 'base',
      component: base,
      children: [
        {
          path: '',
          name: 'caseTotal',
          component: projectList
        },
        {
          path: 'projectList',
          name: 'projectList',
          component: projectList
        },
        {
          path: 'projectAdd',
          name: 'projectAdd',
          component: projectAdd
        },
        {
          path: 'moduleList',
          name: 'moduleList',
          component: moduleList
        },
        {
          path: 'moduleAdd',
          name: 'moduleAdd',
          component: moduleAdd
        },
        {
          path: 'caseList',
          name: 'caseList',
          component: caseList
        },
        {
          path: 'caseSingleAdd',
          name: 'caseSingleAdd',
          component: caseSingleAdd
        },
        {
          path: 'caseProcessAdd',
          name: 'caseProcessAdd',
          component: caseProcessAdd
        },
        {
          path: 'testSuite',
          name: 'testSuite',
          component: testSuite
        },
        {
          path: 'periodicTask',
          name: 'periodicTask',
          component: periodicTask
        },
        {
          path: 'reportList',
          name: 'reportList',
          component: reportList
        },
        {
          path: 'report',
          name: 'report',
          component: report
        }
      ]
    },
    {
      path: '/test',
      name: 'test',
      component: test
    },
    {
      path: '',
      name: 'login',
      component: login
    }
  ]
})
